<div class="body_content">
   <div class="top_content">
      <div class="left">
	 <div style="margin-right: 20px; margin-top: 8px;margin-bottom: 10px;">
	    <h1>Create Server Cabinet</h1>
	 </div>
      </div>
      <div class="right align_right">
	 
      </div>
   </div>
   <div class="hr"></div>
   <div class="bottom_content">
      <?php
      $db = new Database();
      $getCabinet = $db->query("SELECT * FROM cabinet","numrows");
      if($getCabinet!=0){
      ?>
      <div style="float: left; margin-top: 10px; width: 100%;">
         <div class="titleBar">
            <div class="holderLeft">
               <div class="titlePosition">
               Choose a cabinet to view their images.
               </div>
            </div>
            <div class="holderRight">
               <img src="/images/loader/zoomloader.gif" style="float: right;margin-right: 20px;margin-top: 2px;" class="display imageloader"/>
            </div>
         </div>
         <div class="Holdercontent">
            <div class="top">
               <?php
                  $db = new Database();
                  $getUploadedCabinet = $db->query("SELECT * FROM cabinet","array");
                  $a = 1;
                  foreach($getUploadedCabinet as $data)
                  {
                     echo "<div class='title cursor' style='height:40px;border-bottom:1px solid #ddd;'>";
                     echo "<div class='left chooseCabinet' data-cabinet-action='getAllImages' rel='".$data['id']."' data-cabinet-name='".$data['cabinetName']."' style='margin-top:10px;' class='chooseCabinetName'>";
                     echo $a++ . ". " . $data['cabinetName'];
                     echo "</div><div class='right'>";
                     ?>
		     
                     <img src="/images/icon/delete.png"  class=" deleteCabinet fl_right" style="margin-top: 10px;" title="Delete this cabinet."rel="<?php echo $data['id']; ?>"/>
                     <img src="/images/icon/edit.png"  class=" editCabinet fl_right" style="margin-top: 10px;" title="Edit this cabinet." rel="<?php echo $data['id']; ?>" data-cabinet-name="<?php echo $data['cabinetName'];?>"/>
                     
                     <?php
                     echo "</div>";
                     echo 
                     "<br>";
                     echo "</div>";
                  ?>
                  <?php
                  }
               ?>
            </div>
         </div>
      </div>
      <?php
      }
      ?>
      <div style="float: left; margin-top: 10px; width: 100%;">
      <div class="titleBar">
	 <div class="left">
	    <div class="titlePosition">
	       Arrange your the cabinet of the server.
	    </div>
	 </div>
	 <div class="right align_right">
	 </div>
      </div>
      <div class="Holdercontent">
	 <div class="top">
	    <div class="holderLeft">
	       <div class="imageConfigurable" style="min-height: 1px;">
	       </div>
	    </div>
	    <div class="holderRight" style="text-align: right;">
	       <input type="button" class="imageSpacer btn" value="Divider" title="Add Cable Manager as the Divider."/>
	    </div>
	 </div>
	    <div class="top" style="padding: 10px; padding-bottom: 0px;">
	       <div style="float: left; position: relative; width: 100%;">
		  <div style="float: left;width: 217px; padding: 5px; border: 1px solid #ddd;text-align: center; font-weight: bold;">
		     Cabinet
		  </div>
		  <div style="float: left;width: 217px; padding: 5px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;text-align: center; font-weight: bold;">
		     Actions
		  </div>
		  <div style="float: left;width: 217px; padding: 5px; border: 1px solid #ddd;text-align: center; font-weight: bold;">
		     Images from <label class="cabinetName"></label>
		  </div>
	       </div>
	    </div>
	    <div class="top update" style="padding: 10px; padding-top: 0px;">
	       <div style="float: left; position: relative; width: 100%;">
		  <div class="imageSortable" style="float: left;width: 217px; min-height: 250px; padding: 5px; border: 1px solid #ddd;">
		      
		  </div>
		  <div class="config" style="float: left;width: 217px; min-height: 250px; padding: 5px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;">
		      
		  </div>
		  <div class="imageList" style="float: left;width: 217px; min-height: 250px; padding: 5px; border: 1px solid #ddd;">
		     
		  </div>
	       </div>
	    </div>
	 <div class="bottom">
	    <div style="text-align: right;">
	       <input type="button" class="saveCabinet btn" data-cabinet-name="" value="Save" title="Save created cabinet."/>
	    </div>
	 </div>
      </div>
      </div>
   </div>
</div>
<script>
     setActivNav('cabinet');
</script>